import axios from "axios";
import service from "@/config/index";

const URLS = {
  SEARCH: `${service.serviceBasic}/receivingAddress/search`,
  IMPORT: `${service.serviceBasic}/receivingAddress/readExcel`,
  BATCH_INSERT: `${service.serviceBasic}/receivingAddress/batchInsert`
};

export default {
  search(filter) {
    return axios.post(URLS.SEARCH, filter);
  },
  importExcel(file) {
    return axios.post(URLS.IMPORT, file, { timeout: 20000 });
  },
  batchInsert(filter) {
    return axios.post(URLS.BATCH_INSERT, filter);
  }
};
